import { RigidBody } from "../behaviours/RigidBody";
import { Behaviour } from "../engine/Behaviour";
import { number } from "../engine/validators/number";
import { binding, Binding, makeBinding } from "./Binding";

export class Button3PrefabBinding extends Binding {
    @number()
    @binding((prefabRoot, value) => {
        prefabRoot.getBehaviour(RigidBody).x = value;
    })
    x: number;

    @number()
    @binding((prefabRoot, value) => {
        prefabRoot.getBehaviour(RigidBody).y = value;
    })
    y: number;


    constructor() {
        super();
        makeBinding(this)
    }
}